<template>
  <h4>
    <slot></slot>
  </h4>
</template>

<script setup lang="ts">
import { onBeforeUpdate, onUpdated, onBeforeUnmount, onUnmounted } from "vue";

onBeforeUpdate(() => {
  console.log("A 组件数据更新前");
});

onUpdated(() => {
  console.log("A 组件数据更新后");
});

onBeforeUnmount(() => {
  console.log("A 组件销毁前");
});

onUnmounted(() => {
  console.log("A 组件销毁后");
});
</script>

<style scoped></style>
